Don't blow away checked out git repos
authorAlex Crichton <alex@alexcrichton.com>
Wed, 10 Sep 2014 14:47:11 +0000 (07:47 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 10 Sep 2014 14:47:11 +0000 (07:47 -0700)
commit78acc7398912856fe3c7b5a3a681ca25718df564
treed749ab906e2cb7c8a4105e2710f946725350daea
parentef959038b7eee8ee0c83f4b57ed662c01c477bff
Don't blow away checked out git repos

This primarily blows away all *submodules* as well, which sometimes can be quite
large and take some time to update. Instead, re-use an existing checkout, just
reset it to the right revision if possible.

Also, move the submodule update step to occur unconditionally to account for
corrupt submodule checkouts or interrupted downloads. This update step should be
much faster than `git submodule update` because we're using libgit2, so yay!
src/cargo/sources/git/utils.rs
tests/test_cargo_compile_git_deps.rs